﻿using System;
using Shell.PocoDot;

namespace Shell.DomainDot
{
    public static class IDomainDotFactoryExtensions
    {
        public static TDomainDot Create<TDomainDot, TMainPocoDot>(this IDomainDotFactory factory, Guid key)
            where TDomainDot : DomainDotBase<TMainPocoDot>
            where TMainPocoDot : PocoDotBase
        {
            return factory.Create<TDomainDot>(key);
        }

        public static TDomainDot Create<TDomainDot>(this IDomainDotFactory factory)
            where TDomainDot : DomainDotBase
        {
            return factory.Create<TDomainDot>(null);
        }
    }
}
